package com.example.administrator.zjyapp;

public class Book {
    //属性封装
    private String bookName;
    private String bookType;
    private double price;

    // 构造方法
    public Book() {// 空构造
    }

    public Book(String bookName, String bookType,double price) {
        this.bookName = bookName;
        this.bookType = bookType;
        this.price = price;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {

        this.bookName = bookName;
    }

    public double getPrice() {

        return price;
    }

    public void setPrice(double price) {

        this.price = price;
    }
    public void setBookType(String type){
        this.bookType = type;
    }
    public String getBookType(){
        return this.bookType;
    }
}
// 重写toString方法
//public String toString() {
//     return   " 名称：" + this.bookName +"类型：" + bookType +" 价格：" + this.price;
// }